<template>
  <div class="works_list_box">
    <HYTitle title="zhanshi" />
    <WorksList :list="workList" />
  </div>
</template>

<script lang="ts">
import { defineComponent, onMounted, reactive, ref, toRef, toRefs } from "vue";
import { useRoute } from "vue-router";
import { gitWorksVote } from "@/utils/apis/home";
import WorksList from "@/components/WorksList.vue";
import HYTitle from "@/components/HYTtile.vue";
export default defineComponent({
  name: "Worklist",
  components: {
    WorksList,
    HYTitle,
  },
  props: {},
  setup() {
    const state = reactive({
      workList: [],
    });
    onMounted(async () => {
      const workList = await gitWorksVote({ page: 1, pageSize: 999999 });
      state.workList = workList.data.list;
    });
    return { ...toRefs(state) };
  },
});
</script>
<style lang="scss" scoped>
.works_list_box {
  padding: 30px 20px;
}
</style>
